import sys
import os

workdir = sys.path[0]

from engine.enine import *
import os
import argparse

def parser():
    parser = argparse.ArgumentParser(description='Trainging Template')
    # general
    parser.add_argument('--cfg', default="config/config.yml", type=str)
    parser.add_argument('--train_flag', default='train', type=str)

    args = parser.parse_args()
    return args

if __name__ == '__main__':
    args = parser()
    config = Config(args).get_config()

    logger = Logger(config.train.log)  # 用来记录训练的日志
    engine = trainEngine(config, logger)
    engine.train()


